scrolledwindow: Ensure indicator windows are created at the right place
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 17 Feb 2015 15:21:42 +0000 (16:21 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 17 Feb 2015 15:32:36 +0000 (16:32 +0100)
commit5a907cc094d518e5a69848ea573832bc0a7f11f1
treeb7f9d29171cd63c9ea33e30684d93d979c85f68e
parentc473afbdc9dac6c425d41a5827f5539140c38252
scrolledwindow: Ensure indicator windows are created at the right place

At the time of creating the indicator window, the scrollbar allocation is
poked and reused as the initial window dimensions. This usually happens
on two circumstances, either initially (so a ::size-allocate is emitted,
relocating the windows in the right places), or post-initialization when
calling set_overlay_scrolling() (so the scrollbars already have a valid
size allocation)

However, if the scrolledwindow is unrealized, and later re-realized again,
the scrollbars will already have a valid allocation, although 0,0 based
due to being contained in the previous indicator window. This comes out
wrong then, and the indicator window is given 0,0 based coordinates too.

Fix this by refactoring the scrollbar allocation code out of size_allocate,
and also use that given size at the time of creating the indicator windows,
this will provide the right widget-relative allocation anytime.
gtk/gtkscrolledwindow.c